﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="Token.Piker.Web.Admin.User.List" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>用户管理</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p>
        <label for="txtKeyword">
            请输入用户名：</label>
        <asp:TextBox ID="txtKeyword" runat="server" Width="200" Height="25"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="bntSearch" runat="server" Text="查询" Width="100" Height="25" 
            onclick="bntSearch_Click" />
    </p>
    <p>
    </p>
    <asp:GridView ID="gridView" runat="server" Width="98%" CellPadding="3" BorderWidth="1px" DataKeyNames="ID"
        AutoGenerateColumns="false" PageSize="10"
        RowStyle-HorizontalAlign="Center">
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="用户名"
                ItemStyle-HorizontalAlign="Center" />
            <asp:BoundField DataField="LastLogTime" HeaderText="最近登录时间" ItemStyle-HorizontalAlign="Center" />
            <asp:TemplateField HeaderText="性别" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <%# Eval("Gender").ToString() == "0"?"男":"女" %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="QQ" HeaderText="QQ" ItemStyle-HorizontalAlign="Center" />
            <asp:TemplateField HeaderText="状态" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:LinkButton ID = "lkbChangeState" runat = "server" Text = '<%# Eval("Flag").ToString() == "0" ? "正常":"禁用" %>' CommandArgument = '<%# Eval("ID") %>' OnClick = "ChangeState"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField HeaderText="详细" ControlStyle-Width="50" DataNavigateUrlFields="ID"
                DataNavigateUrlFormatString="Show.aspx?id={0}" Text="详细" />
        </Columns>
    </asp:GridView>
    <p>
    </p>
    <webdiyer:AspNetPager ID="pagerList" runat="server" Width="95%" NumericButtonCount="6"
        UrlPaging="true" NumericButtonTextFormatString="[{0}]" CustomInfoHTML=" 第 <font color='red'><b>%CurrentPageIndex%</b></font> 页 共 %PageCount% 页 显示 %StartRecordIndex%-%EndRecordIndex% 条"
        ShowCustomInfoSection="left" FirstPageText="首页" LastPageText="末页" NextPageText="下页"
        PrevPageText="上页" Font-Names="Arial" BackColor="#F8B500" AlwaysShow="true" ShowInputBox="Always"
        SubmitButtonText="跳转" OnPageChanged="pagerList_PageChanged" PageSize="10" ReverseUrlPageIndex="True">
    </webdiyer:AspNetPager>
</asp:Content>
